package com.maiji.cloud.mapper;

import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.maiji.cloud.entities.login.AppUser;
import com.maiji.cloud.response.login.DistributionUserListResData;

@Mapper()
public interface AppUserMapper extends BaseMapper<AppUser> {

	boolean updateAppUser (AppUser appUser);

	/**
	 * 获得下级用户集合
	 * @param uuId
	 * @return
	 */
	List<DistributionUserListResData> selectUserByPid(@Param("userId")String userId,@Param("date")Date date);
	
	/**
	 * 获得下级用户集合
	 * @param uuId
	 * @return
	 */
	List<DistributionUserListResData> selectListUserByPid(@Param("userId")String userId,@Param("date")Date date,@Param("start")Integer starPage,@Param("limit")Integer limit);

	
	void updateByUuId(AppUser appUser);

	void updateByPid(@Param("userId")String userId);
}
